#include <stdio.h>

int main() {
	double m = 0;
	double n = 0;
	if (scanf("%lf %lf", &m, &n) != 2 || m > 100000 || m < -100000 || n > 100000 || n < -100000) {
		printf("input error\n");
		return 0;
	}
	if (((m - 2) * (m - 2) + (n - 2) * (n - 2)) <= 1 ||
	        ((m + 2) * (m + 2) + (n - 2) * (n - 2)) <= 1 ||
	        ((m + 2) * (m + 2) + (n + 2) * (n + 2)) <= 1 ||
	        ((m - 2) * (m - 2) + (n + 2) * (n + 2)) <= 1) {
		printf("10\n");
	} else {
		printf("0\n");
	}

	return 0 ;
}